<?php
session_start();
      if (isset($_SESSION['k_username'])) {
include ("conexion.inc.php");
$link = Conectarse();
mysql_select_db("gotica_sociosgotica",$link);
$sql2="SELECT idsocio, idTipoSocio FROM socios";
$result=mysql_query($sql2,$link);
while($row =mysql_fetch_array($result))
{
	$sql3 = "INSERT INTO socio_tiposocio (idsocio, idtiposocio) VALUES ('$row[idsocio]', '$row[idTipoSocio]')";
$result2=mysql_query($sql3,$link);
}
?>
<?
}else
{
	echo "<SCRIPT LANGUAGE=\"javascript\">";
echo "location.href = \"index.php\"";
echo "</SCRIPT>";
	}
?>